# 使用openjdk的镜像，alpine构建的镜像比较小
FROM openjdk:8-alpine

# 设置维护者
MAINTAINER dataxGroup

# 安装python命令
RUN apk add python2

## 设置时区
ENV TZ=Asia/Shanghai
# RUN sed -e 's/dl-cdn[.]alpinelinux.org/nl.alpinelinux.org/g' -i~ /etc/apk/repositories
RUN echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories \
    && apk --no-cache add tzdata zeromq \
    && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
    && echo '$TZ' > /etc/timezone

## 把datax(不包含datax插件) 添加到镜像里面
ADD datax-no-plugins.tar.gz  .

## 把datax的插件  添加到镜像里面
# ADD datax-plugins.tar.gz  /datax/

## 添加datax的脚本

COPY datax-python3  /datax/bin

VOLUME /job/json/

VOLUME /datax/plugins/

ADD   stream2stream.json   /job/json/
##
ADD entrypoint.sh  /usr/local/bin/entrypoint.sh

RUN chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT ["entrypoint.sh"]





